#!/usr/bin/env python
#-*- coding:gbk -*-
u'''
@file rt.py
@brief print runtime of program
@author hulei
@version 1.0
@date 2012-08-06
@copyright 2012 Hulei. All rights reserved.
'''

import os
import sys
from subprocess import call
import time

def main():
    cmds = sys.argv[1:]
    t = time.time()
    ret = call(cmds, shell=True)
    elapsed = time.time() - t
    print "Time used: %.3f sec." % elapsed
    sys.exit(ret)

if __name__ == '__main__':
    main()
